<?php
    $this->load->view("fungsiPenting.php");
    
    foreach($getDetail as $a){
        $aInfoId  			= $a["INFO_ID"];
		$aInfoNik  			= $a["INFO_NIK"];
		$aInfoUntukNik  	= $a["INFO_UNTUK_NIK"];
		$aInfoAtasanNik  	= $a["INFO_ATASAN_NIK"];
		$aInfoSdate  		= $a["INFO_SDATE"];
		$aInfoShour  		= $a["INFO_SHOUR"];
		$aInfoSminute  		= $a["INFO_SMINUTE"];
		$aInfoRepetition  	= $a["INFO_REPETITION"];
		$aInfoKeterangan  	= $a["INFO_KETERANGAN"];
		$aInfoSubject  		= $a["INFO_SUBJECT"];
		$aInfoDescription  	= $a["INFO_DESCRIPTION"];
		
		$cName				= $a["NIKNAME"];
		$cJob				= $a["NIKJOBPOSITION"];
		$cOrg				= $a["NIKORG"];
		$cNameAtasan		= $a["ATASANNAME"];
    }
?>
<!--
<div class="container" style="margin-top:40px">
-->
	<div class="col-md-offset-0" id="top">
	<div class="col-md-11">
	<div id="report" class="panel panel-default">
		<div class="panel-heading">
		<h4 class="panel-title"><b> Paging Info</b></h4>
		
		<div class="btn-group pull-right">
			<button class="btn btn-default btn-sm" id="btnExport"><i class="icon-file-excel on-left"></i> Excel</button>
			<button class="btn btn-default btn-sm" type='button' value='Print' onclick="printDiv('tblExport');"><i class="icon-printer on-left"></i> Print</button>
		</div>
		
		</div>
		<div class="panel-body" id="tblExport">	
			<div class="row">
				<div class="col-sm-4">
					<img class="img-responsive" src="<?php echo base_url() ?>static/images/logo_telkomsel.png">
				</div>
				<div class="col-sm-4" align="center">
                    <h3>
                    <?php echo $cRequestNo;?>
                    </h3>
				</div>
				<div class="col-sm-4"></div>
			</div>
			<br />
			
			<div class="row">
				<div class="col-sm-12">
					<div class="table-responsive" style="border: none;">
						<table class="table" style="border: none;">
                        <!--<table>-->
							<tr>
								<td width="30%">No. Order</td>          <td width="5%">:</td>         <td width="65%"><?php echo $cRequestNo;?></td>
                            </tr>
							<tr>
								<td width="30%">Nik</td>                <td width="5%">:</td>         <td width="65%"><?php echo $aInfoUntukNik;?></td>
                            </tr>
                            <tr>
								<td width="30%">Nama</td>               <td width="5%">:</td>         <td width="65%"><?php echo $cName;?></td>
                            </tr>
                            <tr>
                                <td width="30%">Departemen</td>         <td width="5%">:</td>         <td width="65%"><?php echo $cOrg;?></td>
                            </tr>
                            <tr>    
								<td width="30%">Job Position</td>       <td width="5%">:</td>         <td width="65%"><?php echo $cJob;?></td>
                            </tr>
                            <tr>    
                                <td width="30%">Request Date</td>       <td width="5%">:</td>         <td width="65%"><?php echo $aInfoSdate;?></td>
                            </tr>
                            <tr>
                                <td width="30%">Repetition</td>         <td width="5%">:</td>         <td width="65%"><?php echo $aInfoRepetition;?></td>
                            </tr>
                            <tr>
                                <td width="30%">Subject</td>            <td width="5%">:</td>         <td width="65%"><?php echo $aInfoSubject;?></td>
                            </tr>
                            <tr>
                                <td width="30%">Keterangan</td>         <td width="5%">:</td>         <td width="65%"><?php echo $aInfoKeterangan;?></td>
                            </tr>
                            <tr>
                                <td width="30%">Nama Atasan</td>        <td width="5%">:</td>         <td width="65%"><?php echo $cNameAtasan;?></td>
                            </tr>
                            <tr>
                                <td width="30%">Description</td>        <td width="5%">:</td>         <td width="65%"><?php echo nl2br($aInfoDescription);?></td>
							</tr>    
						</table>
					</div>
					
				</div>
			</div>
			
		</div>
	</div>
	</div>
	</div>
<!--</div>-->

<script>
	$(function() {
		$("input[id^='datepicker']").datetimepicker({
			scrollInput: false,
			yearOffset:0,
			lang:'en',
			timepicker:false,
			datepicker:true,
			format:'d-m-Y',
			formatDate:'d/m/Y',
			/*minDate:'-1970/01/01',
			onGenerate:function( ct ){
				$(this).find('.xdsoft_date.xdsoft_weekend')
					.addClass('xdsoft_disabled');
			}*/
		});
	});
</script>
<script>
    $(document).ready(function () {
        $("#btnExport").click(function () {
            $("#tblExport").btechco_excelexport({
                containerid: "tblExport"
               , datatype: $datatype.Table
               , filename: 'Report_Coordination_<?php echo str_replace("-","",$this->input->post('date_start'))."-".str_replace("-","",$this->input->post('date_end')); ?>'
            });
			
        });
		
    });
</script>
<script>
	function printDiv(divName) 
	{
		var printContents = document.getElementById(divName).innerHTML;     
		var originalContents = document.body.innerHTML;       
		document.body.innerHTML = printContents;      
		window.print();      
		document.body.innerHTML = originalContents;
		window.parent.reload();
   }
</script>
<style type="text/css">
table { border-collapse:collapse; width:100%;}
table td, table th { border:1px solid #ddd; padding:2px; }

table { page-break-inside:auto }
tr    { page-break-inside:avoid; page-break-after:auto }
thead { display:table-header-group }
tfoot { display:table-footer-group }

.table > tbody > tr > td {
	padding: 3px;
}
</style>

